

(function($) {
	$.fn.validationEngineLanguage = function() {};
	$.validationEngineLanguage = {
		newLang: function() {
			$.validationEngineLanguage.allRules = 	{"required":{    			// Add your regex rules here, you can take telephone as an example
						"regex":"none",
						"alertText":"* 该栏位是必填栏位",
						"alertTextCheckboxMultiple":"* 请选择一个选项",
						"alertTextCheckboxe":"* 该选择栏是必填栏位"},
					"length":{
						"regex":"none",
						"alertText":"* 仅允许输入 ",
						"alertText2":" 到 ",
						"alertText3": " 个字符"},
					"maxCheckbox":{
						"regex":"none",
						"alertText":"* 超过允许的最大选项数"},
					"minCheckbox":{
						"regex":"none",
						"alertText":"* 请至少选择 ",
						"alertText2":" 个选项"},
					"confirm":{
						"regex":"none",
						"alertText":"* 您的输入不符合要求"},
					"telephone":{
						"regex":"/^[0-9\-\(\)\ ]+$/",
						"alertText":"* 电话号码格式无效"},
					"email":{
						"regex":"/^[a-zA-Z0-9_\.\-]+\@([a-zA-Z0-9\-]+\.)+[a-zA-Z0-9]{2,4}$/",
						"alertText":"* 电子邮件格式不正确"},
					"date":{
                                                "regex":"/^[0-9]{4}\-\[0-9]{1,2}\-\[0-9]{1,2}$/",
                                                "alertText":"* 无效的日期，日期格式必须是 YYYY-MM-DD"},
					"onlyNumber":{
						"regex":"/^[0-9\ ]+$/",
						"alertText":"* 仅允许输入数字" },
                                        "validNumber": {
						"regex":"/^(([\-|\+]{0,1})[0-9]+(\\.[0-9]{1,2}){0,1}){0,1}$/",
						"alertText":"* 您输入的货币数额格式不正确" },
					"noSpecialCaracters":{
						"regex":"/^[0-9a-zA-Z]+$/",
						"alertText":"* 不允许特殊字符"},
					"ajaxUser":{
						"file":"validateUser.php",
						"extraData":"name=eric",
						"alertTextOk":"* 该用户名有效",
						"alertTextLoad":"* 正在载入，请稍等...",
						"alertText":"* 该用户名已被使用"},
					"ajaxName":{
						"file":"validateUser.php",
						"alertText":"* 该名称已被使用",
						"alertTextOk":"* 该名称有效",
						"alertTextLoad":"* 正在载入，请稍等..."},
					"onlyLetter":{
						"regex":"/^[a-zA-Z\ \']+$/",
						"alertText":"* 仅允许输入字符"},
					"validate2fields":{
                                            "nname":"validate2fields",
                                            "alertText":"* 您必须同时输入姓名"},
                                        "validateDebitCredit": {
                                            "nname": "validateDebitCredit",
                                            "alertText": "同一行中借方金额和贷方金额不可同时存在" }
					}
					
		}
	}
})(jQuery);

$(document).ready(function() {	
	$.validationEngineLanguage.newLang()
});